﻿using mousetouchhookwinform.log;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using VMTOUCH;

namespace mousetouchhookwinform
{
    public partial class Form3 : WMTouchForm
    {
        public Form3()
        {
            InitializeComponent();
            Touchdown += TouchDown;            
        }
        private void TouchDown(object sender, WMTouchEventArgs e)
        {
           int x =  e.ContactX;
           int y = e.ContactY;
           int a = e.LocationX;
           int b = e.LocationY;          
           string out1 = "ContactX座标" + x.ToString() + "ContactY坐标" +  y.ToString();
           string out2 = "LocationX座标" + a.ToString() + "LocationY坐标" + b.ToString();
           WriteLog.WriteLog1(out1);
           WriteLog.WriteLog1(out2);
           bool f = (a>=0 & a <=50) & ( b>=1050 & b<=1080);
           WriteLog.WriteLog1(f.ToString());
            if (f)
            {
                WriteLog.WriteLog1("位置正确");
               
            }
           
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
